<?php
/*
 * <joebenick.badiola@badjography.com> 20090716: zeratool helper (www.zeratool.com)
 * 					helper used to include css and javascript files easyly.
 */


function include_css($cssfile, $return = true)
{
    $str = '<style type="text/css" media="screen">'."\n";
	$str.= "<!--\n";
	if(is_array($cssfile))
    {
    	foreach ($cssfile as $css)
		{
			$str.= '@import url("'.base_url(). 'includes/css/' .$css.'");'."\n";           
		}
	}
	else
	{
		$str.= '@import url("'.base_url() . 'includes/css/' .$cssfile.'");'."\n";        
	}

	    $str.= "-->\n";
	 $str.= '</style>' . "\n";
	 if($return)return $str;
	echo $str;
}

function include_js($jsfile, $return = true)
{
    if(is_array($jsfile))
	{
	    foreach ($jsfile as $js)
		{
			$str.= '<script type="text/javascript" src="'.base_url() . 'includes/js/' . $js.'"></script>'."\n";			
					
		}

	}
	else
    {

	   $str = '<script type="text/javascript" src="'. base_url(). 'includes/js/' . $jsfile.'"></script>'."\n";
	}

	if($return)return $str;
	    echo $str;
}
